package step2;

public class Client {
    public static void main(String args[])
    {
        try
        {
            IOTFactory factory;
            Airsensor air;
            Lightsensor light;
            Soilsensor soil;
            factory=(IOTFactory)XMLUtil.getBean();
            air=factory.produceAirsensor();
            light=factory.produceLightsensor();
            soil = factory.produceSoilsensor();
            air.work();
            light.work();
            soil.work();
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}
